set CFBundleDevelopmentRegion to "en" and set CFBundleAllowMixedLocalizations
authorJyrki Gadinger <nilsding@nilsding.org>
Wed, 26 Mar 2025 09:24:16 +0000 (10:24 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 26 Mar 2025 17:27:39 +0000 (17:27 +0000)
according to [1] the value should be a ISO 639-1 code, so let's correct
it

`CFBundleAllowMixedLocalizations` is the most interesting one: with this
being set the reported QLocale will no longer be English as well

(this also bumps the version info to 2025 :D)

[1]: https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundledevelopmentregion

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
cmake/modules/MacOSXBundleInfo.plist.in
src/gui/application.cpp

index 4e79cc740194ac5baddb48c3832ab0c758753bc7..5705f344d6c2260594fc9cff9f4492d0b153b1ff 100644 (file)
@@ -3,13 +3,15 @@
 <plist version="1.0">
 <dict>
         <key>NSPrincipalClass</key>
-       <string>NSApplication</string>
-       <key>LSMinimumSystemVersion</key>
+        <string>NSApplication</string>
+        <key>LSMinimumSystemVersion</key>
         <string>11.0</string>
-       <key>LSUIElement</key>
-       <true/>
-       <key>CFBundleDevelopmentRegion</key>
-        <string>English</string>
+        <key>LSUIElement</key>
+        <true/>
+        <key>CFBundleDevelopmentRegion</key>
+        <string>en</string>
+        <key>CFBundleAllowMixedLocalizations</key>
+        <true/>
         <key>CFBundleExecutable</key>
         <string>@APPLICATION_NAME@</string>
         <key>CFBundleIconFile</key>
@@ -29,7 +31,7 @@
         <key>CFBundleShortVersionString</key>
         <string>@MIRALL_VERSION_STRING@</string>
         <key>NSHumanReadableCopyright</key>
-        <string>(C) 2014-2024 @APPLICATION_VENDOR_XML_ESCAPED@</string>
+        <string>(C) 2014-2025 @APPLICATION_VENDOR_XML_ESCAPED@</string>
         <key>NSSupportsAutomaticGraphicsSwitching</key>
         <true/>
         <key>NSRequiresAquaSystemAppearance</key>
index 6c00e6b6d745d4f5c6ebc8dbdea1600f2ce013fd..53c85e4b2137051bf1c9c2813669d9a37a730569 100644 (file)
@@ -1003,8 +1003,10 @@ QString substLang(const QString &lang)
 
 void Application::setupTranslations()
 {
+    qCInfo(lcApplication) << "System UI languages are:" << QLocale::system().uiLanguages();
     const auto enforcedLocale = Theme::instance()->enforcedLocale();
     const auto lang = substLang(!enforcedLocale.isEmpty() ? enforcedLocale : QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore).first());
+    qCInfo(lcApplication) << "selected application language:" << lang;
 
     auto *translator = new QTranslator(this);
     auto *qtTranslator = new QTranslator(this);